DataSource for Entity Framework in WPF
C1.LiveLinq.AdoNet Namespace / AdoNetExtensions Class / IndexedField Method / IndexedField<T>(DataRow,DataColumn) Method
The type of the data column
The data row.
The data column.
Example

In This Topic
    IndexedField<T>(DataRow,DataColumn) Method
    In This Topic
    A hint to create and use an index on the specified data column. The hint has default action.
    Syntax
    'Declaration
     
    Public Overloads Shared Function IndexedField(Of T)( _
       ByVal row As DataRow, _
       ByVal column As DataColumn _
    ) As T
    public static T IndexedField<T>( 
       DataRow row,
       DataColumn column
    )

    Parameters

    row
    The data row.
    column
    The data column.

    Type Parameters

    T
    The type of the data column

    Return Value

    The data column value.
    Remarks
    Hints are used declaratively. They tell LiveLinq query optimizer to create and use an index on that column, if possible. When the query is executed, the hint method IndexedField is replaced with the standard LINQ to DataSet extension method Field. See C1.LiveLinq.Hints for more details.
    Example
    var query = from c in customersTable
        where c.IndexedField<string>(customerColumn) == "ALFKI"
        select c;
    See Also